<!DOCTYPE html>
<html>
  <head lang="en">
    <meta charset="UTF-8" />
    <title></title>
    <style type="text/css">
      .ad {
        display: none;
        position: fixed;
        right: 0;
        bottom: 0;
        width: 230px;
        height: 120px;
        background-image: url(./images/ad.jpg);
      }

      .ad span {
        position: absolute;
        right: 0;
        top: 0;
        width: 40px;
        height: 18px;
        background-image: url(./images/h.jpg);
        cursor: pointer;
      }
    </style>
    <script src="./jquery.min.js"></script>
    <script>
      $(function () {
        $(".ad").slideDown().slideUp().fadeIn();
        $("span").click(function () {
          $(".ad").fadeOut();
        });
      });
    </script> 
  </head>

  <body>
    <!--整个广告-->
    <div class="ad">
      <!--关闭按钮-->
      <span></span>
    </div>
  </body>
</html>
